home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 090 / cmln0386.arc / RBASE1.LTG < prev    next >
Text File  |  1986-03-03  |  2KB  |  82 lines

  1.  
  2.                             LISTING 1 
  3. è$COMMAND
  4. MAINPROC                     *(Main Command File)
  5. *(WRKMENU.CMD: compile to WRKMENU.PRC)
  6. set err mess off
  7. set mess off
  8. set err var dbcheck          *(Define an error trapping variable)
  9. set var dbcheck to -1
  10. set var choice to 0
  11. set var done to N
  12. newpage
  13. choose choice from menu1     *(Display Menu1 and Accept Selection)
  14. if choice eq 0 then
  15.   set err mess on
  16.   set mess on
  17.   quit
  18. endif
  19. if choice eq 1 then
  20.   newpage
  21.   fillin dbname using "Enter database name or <ENTER> to Quit: " at 4 5
  22.   if dbname exists then
  23.     open .dbname             *(Open the database specified at 4 5)
  24.     if dbcheck ne 0 then     *(Use error trapping variable)
  25.       write "Sorry, database doesn't exist, press any key to continue."
  26.       pause
  27.       goto end               *(processing skips to Label "End")       
  28.     endif                 
  29.     while done eq N then
  30.       newpage
  31.       choose choice1 from menu2
  32.       if choice1 eq 1 then
  33.         newpage
  34.         list all
  35.         write "Press any key to continue"
  36.         pause
  37.       endif
  38.       if choice1 eq 2 then
  39.         newpage
  40.         list tables
  41.         fillin tablname using "Please select table or <ENTER> to Quit: " at 15 5
  42.         newpage
  43.         if tablname exists then
  44.           choose choice2 from menu3
  45.           if choice2 eq 1 then
  46.              load .tablname with prompts 
  47.           endif                          
  48.           if choice2 eq 2 then
  49.              edit all from .tablname
  50.           endif
  51.         endif
  52.       endif
  53.       fillin done using "Are you done with this database? (Y/N)  "
  54.     endwhile
  55.   endif
  56.   label end
  57. endifèif choice eq 2 then
  58.   newpage
  59.   Fillin pathname using "Enter Path or <ENTER> to Quit: " at 4 5
  60.   if pathname exists then
  61.     dir .pathname
  62.     write "Press any key to continue"
  63.     pause
  64.   endif
  65. endif
  66. run mainproc in wrkmenu.prc
  67. $MENU
  68. menu1
  69. column  Main Menu (Esc to Exit) *(Specifies vertical menu and Heading)
  70. Select a Database               *(Selection 1)
  71. List Files                      *(Selection 2)
  72. $MENU
  73. menu2
  74. column Action Menu
  75. List Tables and Columns
  76. Work on the Database
  77. $MENU
  78. menu3
  79. column Work Menu
  80. Add Records
  81. Display/Edit/Delete Records
  82.